AppendObject
Description
AppendObject upload files by append write. The type of object created by AppendObject operation is Appendable Object, while the object uploaded by PutObject is Normal Object.
Request Method
POST
Request Path
/apsara/route/OneRouter/AppendObject
Request Parameters Common Parameters
Name | Location | Type | Required | Sample value | Description |
---|---|---|---|---|---|
x-oss-meta-* | BODY | string | No | x-oss-meta-location | you can add a x-oss-meta-* when creating a AppendObject, and you cannot carry this parameter when you continue to add it. If a parameter prefixed with x-oss-meta-* is configured, the parameter is treated as metadata. metadata size limit: an object can contain multiple metadata, but the total size of all metadata cannot exceed 8KB. metadata naming rules: supports dashes (-), numbers, and English letters (a ~ z). The uppercase letters of English characters are converted to lowercase letters, and other characters including underscores (_) are not supported. |
x-oss-object-acl | BODY | string | No | private | specifies the access rights of the object. Value: public-read: only the owner of the storage space can write to the object in the storage space, anyone (including anonymous visitors) can read the files in the storage space. private: Only the owner of the storage space can read and write the objects in the storage space, and others cannot access the objects in the storage space. public-read-write: Anyone (including anonymous visitors) can read and write the objects in the storage space, the cost of all these operations is borne by the owner of the storage space, please use this permission with caution. |
regionId | BODY | string | Yes | No sample value for this parameter. | region id |
Content-Disposition | BODY | string | No | attachment;filename=oss_download.jpg | Specify the name of the object when it is downloaded. For more information, please refer to RFC2616. default value: none |
Content-Encoding | BODY | string | No | utf-8 | specifies the content encoding format of the object. For more information, please refer to RFC2616. Default value: None |
position | BODY | string | Yes | 0 | is used to specify where to append from. After each operation is successful, the response message header x-oss-next-append-position will indicate the position to be appended next time. the position of the first append operation must be 0, and the position of the subsequent append operation is the current size of the Object. For example, if the first AppendObject request specifies a position value of 0 and content-length is 65536, the second AppendObject needs to specify a position of 65536. when the position value is 0 and there is no object with the same name, the AppendObject is similar to the PutObject request, that is, request headers such as x-oss-server-side-encryption are allowed to be set. If the correct x-oss-server-side-encryption header is added, subsequent AppendObject response headers will also contain x-oss-server-side-encryption headers. If you need to change metadata later, you can use the CopyObject interface. when the position value is correct, add a content with a size of 0 to the existing Appendable Object. this operation will not change the state of the object. |
Expires | BODY | gmt | No | Wed, 08 Jul 2015 16:57:01 GMT | expiration time. For more information, please refer to RFC2616. Default value: None |
x-oss-server-side-encryption | BODY | string | No | AES256 | specifies the server-side encryption method. Legal value: AES256: Use OSS fully managed key for encryption and decryption (SSE-OSS) KMS: Use KMS managed key for encryption and decryption SM4: national security SM4 algorithm |
version | BODY | string | No | 2016-01-01 | version of api |
append | BODY | string | Yes | not involved | is used to specify AppendObject operation. Each execution AppendObject updates the last modification time of the object. |
Cache-control | BODY | string | No | no-cache | specifies the web page caching behavior of the object. For more information, please refer to RFC2616. Default value: None |
Content-MD5 | BODY | string | No | ohhnqLBJFiKkPSBO1eNaUA== | The Content-MD5 is a string of values generated by the MD5 algorithm. The request header is used to check whether the message content is the same as when it was sent. obtain the Content-MD5 value: execute the MD5 algorithm on the message content (excluding the header) to obtain a 128-bit number, and then perform base64 encoding on the number. default value: none limit: none |
Return data
Name | Type | Sample value | Description |
---|---|---|---|
x-oss-hash-crc64ecma | 64-bit integer | 3231342946509354535 | indicates the 64-bit CRC value of Object. The 64-bit CRC is calculated by ECMA-182 standard. |
x-oss-next-append-position | 64-bit integer | 1717 | the position that should be provided in the next request, that is, the current object size. this message header is returned when the AppendObject is executed successfully or a 409 error is caused by a mismatch between the position and the size of the Object. |
Example
Successful Response example
{
"x-oss-hash-crc64ecma":"3231342946509354535",
"x-oss-next-append-position":"1717"
}
Failed Response example
{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}
}